package cn.iocoder.yudao.module.erp.dal.mysql.business.order.orderproject;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.erp.controller.admin.business.order.orderproject.vo.OrderProjectPageReqVO;
import cn.iocoder.yudao.module.erp.dal.dataobject.business.order.orderproject.OrderProjectDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 项目 Mapper
 *
 * @author yy
 */
@Mapper
public interface OrderProjectMapper extends BaseMapperX<OrderProjectDO> {

    default PageResult<OrderProjectDO> selectPage(OrderProjectPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderProjectDO>()
                .likeIfPresent(OrderProjectDO::getName, reqVO.getName())
                .betweenIfPresent(OrderProjectDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OrderProjectDO::getId));
    }

}